using System.Data.Common;
using System.Data.SQLite;
using DataAssociations.Repository.Connection.Interfaces;
using DataAssociations.Repository.Connection.ValidationRules;

namespace DataAssociations.Repository.Connection.Implementations
{
    public class SqlLiteConnectionStringType : IConnectionStringType
    {
        [NonEmptyStringValidation]
        public string DataSource { get; set; }
        public string Password { get; set; }

        public DbConnectionStringBuilder BuildConnectionString()
        {
            var builder = new SQLiteConnectionStringBuilder();
            builder.DataSource = DataSource;
            builder.Password = Password;
            return builder;
        }

        public string DataBaseManagementSystemName
        {
            get { return "SqlLite Database"; }
        }
    }
}